<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>小新700电竞版（i5/8G/1T）</title>
<link rel="stylesheet" type="text/css" href="Public/Home/bootstrap/css/bootstrap.min.css"/>
<script type="text/javascript" src="js/jquery-1.7.2.min.js"></script>
<link rel="stylesheet" type="text/css" href="Public/Home/bootstrap/js/bootstrap.min.js"/>
<link rel="stylesheet" type="text/css" href="Public/Home/css/content.css"/>
<link rel="stylesheet" type="text/css" href="Public/Home/css/common.css"/>
<script type="text/javascript" src="Public/Home/js/jquery-1.7.2.min.js"></script>
 <script src="Public/Home/js/xiaoguo.js" type="text/javascript" charset="utf-8"></script>
 	<script type="text/javascript">
 		$(function(){
 			
 		$('.litImgOne').click(function(){
//		alert();
		var c =$(this).attr("irc");
//		alert(c);
		$(".medImg").attr("src",c);
	})


 			
 			
 		})
 		
 	</script>
 	
	</head>
	<body>
				<!--top区域开始-->
		<div id="top_all">
			<div class="top">
				<ul class="top_left">
					<li><a href="">个人及家用产品解决方案</a></li>
					<li><a href="">商用产品解决方案</a></li>
					<li><a href="">企业级产品及解决方案</a></li>
					<li><a href="">服务与支持</a></li>
					<li><a href="">聚享汇会员专享</a></li>					
				</ul>
				  <div class="top_banner1">
				  	<a href="">社交平台</a>
				  </div>
				  <div class="top_banner1">
				  	<a href="">手机版</a>
				  </div>
				  <ul class="top_right">
				  	<li><a href="">登录</a></li>
				  	<li><a href="">注册</a></li>		
				  	<li><a href="">购物车</a></li>
				  </ul>				  
			</div>
		</div>				
		<!--top区域结束-->	
		
		
	   <!--搜索区域开始-->
	   <div id="logo_box">
	   	    <div class="logo"><a href="{{U('Home/Index/index')}}"><img src="Public/Home/images/logo.png"/></a></div>
	   	    <input type="text" id="sousuo" placeholder="Mixx 4" />
	   	   	<input type="submit" name="" id="sous" value="搜索" />
	   </div>
	   <div id="nav_box">
	   	   <div class="ad"></div>
	   	   	<ul class="nav_name">
	   	   		<li><a href="">618电商节</a><span class="nav_hot"></span></li>
	   	   		<li><a href="">爆款</a></li>
	   	   		<li><a href="">特惠</a></li>
	   	   		<li><a href="">联想合伙人</a></li>
	   	   		<li><a href="">0元试用</a><span class="nav_hot"></span></li>
	   	   		<li><a href="">以旧换新</a></li>
	   	   		<li><a href="">用户社区</a></li>	   	   		
	   	   	</ul>	   	   
	   </div>	   
	   <!--搜索区域结束-->
	   
	   <!--商品展示区域开始-->
	    <div class="sy">
	    		<a href="">首页</a>
	    		>
	    		<a href="">商品详情</a>
	    		>
	    		<span>{{$gcData['gname']}} </span>
	    </div>
	    
	      <div id="qbnr">
	      	  <div class="tp_a1">
	      	  	<!--中图-->
	      	  	<div class="top_v">
	      	  		<img src="{{$detailData['photo'][0]}}" alt="" class="medImg" style="width: 540px; height: 540px;" />
	      	  	</div>
	      	  	<!--小图-->
	      	  	<div class="top_d">
	      	  		{{foreach from="$detailData['photo']" key="$k" value="$v"}}
	      	  		<p class="litImgOne" irc="{{$v}}" ibg="">
						<img src="{{$v}}" style="width: 84px;height: 84px;" />
					</p>
					{{endforeach}}
	      	  	</div>
	      	  	
	      	  </div>
	      	  
	      	  <!--<div class="spbh">
	      	  	 <span>商品编号：80SH0002CD</span>
	      	  </div>-->
	      	  
	      	  <div class="ybwz">
	      	      <h1>{{$gcData['gname']}}</h1>
	      	      <span>
	      	      	{{$detailData['service']}}
	      	      </span>
	      	      <div class="de_info_main">
	      	      	<div class="de_info1">
	      	      		<p>商城价:<span>￥{{$gcData['shopprice']}}</span></p>	      	      		
	      	      	</div>
	      	      	<div class="de_info2">
	      	      		<span>促销信息：</span>
	      	      		<span class="de_info3">赠 &nbsp;&nbsp;&nbsp;品</span>
	      	      		<span class="de_info4">
	      	      			<img src="Public/Home/images/tp19.jpg"/>
	      	      			<a href="javascript:;">联想官方商城专属鼠标垫</a>
	      	      		</span>
	      	      	</div>      	      	
	             </div>	 
	<!--<script type="text/javascript">
		$(function(){
			$('.btn').click(function(){
//				alert();
				var str='';
				$.each($('.xuanze'), function() {
					str+=$(this).attr('gtid')+',';
				});
				alert(str);
		 		
				$.ajax({
					type:"post",
					url:"",
					data:{combile:str,num:num},
					dataType:'json',
					success:function(phpData){
						alert();
					}
				});
			
			})
		
		})
		
	</script>-->
	
	<script type="text/javascript">
		$(function(){
			$('.bttn').click(function(){
//				alert();
				var str='';
				$.each($('.xuanze'), function() {
					str+=$(this).attr('gtid')+',';
				});
				$('input[name=combine]').val(str);
//				alert(str);
				var len=$('.xuanze').length;
				if(len>=2){
				$.ajax({
					type:"post",
					url:"{{U('selectsql')}}",
					data:'combine=' + str,
					dataType:'json',
					success:function(phpData){
						if(!phpData.nm){
							$('.ljgm').hide();
							$('.fqfk').hide();
							alert(phpData.info); 
							
							return false;
						}else{
							$('.fqfk').show();
							$('.ljgm').show();
							$('.inventory').html(phpData.info);
						}
					}
				});
				}
			})
		})
	
		
	</script> 
	
	<!--发送需要写入数据库的数量-->
		<script type="text/javascript">
			$(function(){
				$('#yiwei').click(function(){
//					alert(111);
//					当点击加入购物车时，发送数据到php
					var data=$('#form').serialize();
//					alert(data);
//					发送需要写入数据库的所有数据
					$.ajax({
						type:"post",
						url:"{{U('cart/insertCart')}}",
						data:data,
						dataType:'json',
						success:function(phpData){
							alert('加入购物车成功!!!');
							
							location.href="{{U('Cart/index')}}";

						}
						
					});
				})
				
				
			})
		</script>
				<form action="" method="post" id="form">
					
				
				{{foreach from="$specData" key="$k" value="$v"}}
	             <div class="yanss">
	             	<span>{{$v['taname']}}:</span>
	             	{{foreach from="$v['son']" key="$kk" value="$vv"}}
	             	<li class="bttn" gtid="{{$vv['gtid']}}" >{{$vv['gtvalue']}}</li>
	           		{{endforeach}}
	             </div>
	             {{endforeach}}
	             <div class="fqfk">
	             	 <span>库存<span class="inventory">未知</span>{{$goodsData['unit']}}</span>
	             	 <div>
	             	 	<strong>数量:</strong>
	             	 	<select name="number" >
							<option value="1">1</option>
							<option value="2">2</option>
							<option value="3">3</option>
							<option value="4">4</option>
							<option value="5">5</option>
						</select>
	             	 </div>
	                 	<!--组合属性-->
						<input type="hidden" name="combine" id="" />
						<!--商品id-->
						<input type="hidden" name="gid" id="gid" value="{{$_GET['gid']}}" />
	             </div>
	            
	             <a class="ljgm" href="">立即购买</a>
	             <a href="javascript:;" class="ljgm" id="yiwei">加入购物车</a>
	         </div>	 	              
	      </div>
	         </form>
	   <!--商品展示区域结束
	   <!--商品图片部分开始-->
	       <div class="box_tp">
	       	   <div class="rxb">
	       	   	  <span>热销榜</span>
	       	   	  <div class="left1">
	       	   	  	<img src="Public/Home/images/tp22.jpg"/>
	       	   	  	<a href="">拯救者15-ISK i7悦动版</a>
	       	   	  	<b>￥6499</b>
	       	   	  </div>
	       	   	  <div class="left1">
	       	   	  	<img src="Public/Home/images/tp22.jpg"/>
	       	   	  	<a href="">拯救者15-ISK i7悦动版</a>
	       	   	  	<b>￥6499</b>
	       	   	  </div>
	       	   	  <div class="left1">
	       	   	  	<img src="Public/Home/images/tp22.jpg"/>
	       	   	  	<a href="">拯救者15-ISK i7悦动版</a>
	       	   	  	<b>￥6499</b>
	       	   	  </div>
	       	   	  <div class="left1">
	       	   	  	<img src="Public/Home/images/tp22.jpg"/>
	       	   	  	<a href="">拯救者15-ISK i7悦动版</a>
	       	   	  	<b>￥6499</b>
	       	   	  </div>
	       	   	  <div class="left1">
	       	   	  	<img src="Public/Home/images/tp22.jpg"/>
	       	   	  	<a href="">拯救者15-ISK i7悦动版</a>
	       	   	  	<b>￥6499</b>
	       	   	  </div>
	       	   </div>
	       	   
	       	   <div class="tab_hd">
	       	   	 <ul>
	       	   	 	<li><a href="">商品详情</a></li>
	       	   	 	       	   	 	
	       	   	 </ul>
	       	   	 <div class="spdt">
	       	      {{$detailData['intro']}}
	       	     </div>	       	   
	       	   </div>       	   
	       </div>
	       <!--去购物车结算-->
	       
	   
	   <!--商品图片部分结束-->
	</body>
</html>
